package org.dczl.system.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import org.dczl.system.domain.DpLab;
import org.dczl.common.mybatis.core.domain.BaseEntity;
import org.dczl.common.core.validate.AddGroup;
import org.dczl.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.dczl.system.domain.vo.DpUploadVo;

import java.util.List;

/**
 * 实验室业务对象 dp_lab
 *
 * @author jia
 * @date 2025-04-16
 */
@Data
@AutoMapper(target = DpLab.class, reverseConvertGenerate = false)
public class DpLabBo {

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 实验室名称
     */
    @NotBlank(message = "实验室名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 实验室类型(普通、实验箱、智能)
     */
    @NotBlank(message = "实验室类型(普通、实验箱、智能)不能为空", groups = {AddGroup.class, EditGroup.class})
    private String type;

    /**
     * 图片
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<DpUploadVo> images;

    /**
     * 链接地址
     */
    private String linkUrl;

    /**
     * 二维码
     */
    private String qrCode;

    /**
     * 实验室地点
     */
    @NotBlank(message = "实验室地点不能为空", groups = {AddGroup.class, EditGroup.class})
    private String location;


}
